package com.lkq.mongodb_comment.service.impl;

import com.lkq.mongodb_comment.dao.CommentDao;
import com.lkq.mongodb_comment.entity.Comment;
import com.lkq.mongodb_comment.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {
    @Autowired
    private CommentDao commentDao;
    @Override
    public List<Comment> findAll() {
        return commentDao.findAll();
    }

    @Override
    public Comment getComment(String id) {
        return commentDao.getComment(id);
    }

    @Override
    public void update(Comment comment) {
        commentDao.update(comment);
    }

    @Override
    public void insert(Comment comment) {
        commentDao.insert(comment);
    }

    @Override
    public void insertAll(List<Comment> comment) {
        commentDao.insertAll(comment);
    }

    @Override
    public void remove(String id) {
        commentDao.remove(id);
    }
}